<style lang="less" scoped>
  .home-page{
    width: 100%;
    height: 100%;
    .page-top{
      height: 200px;
      width: 100%;
      background-color: #5E8EE2;
      line-height: 200px;
      padding: 0 130px;
      .top-logo{
        height: 100px;
        vertical-align: middle;
        margin-right: 30px;
      }
      .top-title{
        font-size: 40px;
        color: #fff;
        font-weight: 400;
        font-family: SimHei;
      }
    }
    .page-center{
      width: 100%;
      height: ~'calc(100% - 301px)';
      .center-content{
        text-align: center;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        .center-title{
          color: #4380EA;
          font-size: 24px;
          font-weight: 400;
          font-family: SimHei;
        }
        .center-nav{
          height: 4px;
          background: #5E8EE2;
          margin: 25px 0;
        }
        .center-bottom{
          width: 100%;
          display: flex;
          justify-content: center;
          .bottom-content{
            width: 400px;
            cursor: pointer;
            .img-title{
              margin-top: 25px;
              font-size: 20px;
              color: #4380EA;
              font-weight: 400;
              font-family: SimHei;
            }
          }
        }
      }
    }
    .page-bottom{
      width: 100%;
      height: 100px;
      line-height: 100px;
      text-align: center;
      background-color: #5E8EE2;
      .bottom-title{
        color: #fff;
        font-family: Heiti SC;
        font-weight: 300;
      }
    }
  }
</style>

<template>
  <div class="home-page">
    <div class="page-top">
      <img src="~@/images/pageLogo.png" alt="" class="top-logo">
      <span class="top-title">云智医智慧医疗平台</span>
    </div>
    <div class="page-center">
      <div class="center-content">
        <div class="center-title">服务入口</div>
        <div class="center-nav" />
        <div class="center-bottom">
          <div class="bottom-content" @click="goToUrl('manbing')">
            <img src="~@/images/manbing.png" alt="">
            <div class="img-title">慢病筛查随访系统</div>
          </div>
          <div class="bottom-content" style="padding-top: 20px;" @click="goToUrl('wuda')">
            <img src="~@/images/wuda.png" alt="">
            <div class="img-title">五大中心急救系统</div>
          </div>
          <div class="bottom-content" style="padding-top: 20px;" @click="goToUrl('zhuanbing')">
            <img src="~@/images/zhuanbing.png" alt="">
            <div class="img-title">专病管理平台</div>
          </div>
        </div>
      </div>
    </div>
    <div class="page-bottom">
      <span class="bottom-title">技术支持：心智医联（北京）科技有限公司</span>
    </div>
  </div>
</template>

<script>
import base from '@/utils/config/base'
export default {
  data() {
    return {
      integrate: base.VUE_INTEGRATE
    }
  },
  methods: {
    goToUrl(type) {
      if (type == 'manbing') {
        window.location.href = this.integrate + 'chronic'
      } else if (type == 'wuda') {
        this.$router.push({
          path: '/login'
        })
      } else if (type == 'zhuanbing') {
        this.$message({
          message: '功能正在建设中...'
        })
      }
    }
  }
}
</script>
